home *** CD-ROM | disk | FTP | other *** search
- From: "Paul D. DeRocco" <pderocco@ix.netcom.com>
- Message-ID: <31470097.36C0@ix.netcom.com>
- X-Original-Date: Wed, 13 Mar 1996 12:06:31 -0500
- Path: in2.uu.net!bounce-back
- Date: 13 Mar 96 23:43:59 GMT
- Approved: fjh@cs.mu.oz.au
- Newsgroups: comp.std.c++
- Subject: Re: no operator bool()?
- Organization: Netcom
- References: <313ddfd9.16044605@sqarc.sq.com> <313E19BB.5AE2E407@cantrip.org> <31445809.5921189@news.ultranet.com>
- X-Netcom-Date: Wed Mar 13 9:07:41 AM PST 1996
- X-Mailer: Mozilla 2.0 (Win95; I)
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBFAgUBMUddzuEDnX0m9pzZAQEoAgF/RB36DSdEu1H05QIVUrXGSa6uGSxqUxew
- 5JlNPsohK0EJtHMSPWTbOsES3a/k5L6N
- =meXE
-
- Pablo Halpern wrote:
- > I really don't see why the committee is so
- > resistant to this concept. I think the following would be a perfectly
- > satisfactory usage:
- >
- > class istream : public ...
- > {
- > ...
- > explicit operator bool() const;
- > ...
- > };
- >
- > void f()
- > {
- > while (bool(cin))
- > // do something
- > }
-
- There's an awful lot of code out there that says "while (cin) ...", and
- no one wants to rewrite it all just to coax it through the new compiler.
- That's probably the reason.
-
- --
-
- Ciao,
- Paul D. DeRocco
- ---
- [ comp.std.c++ is moderated. To submit articles: try just posting with ]
- [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
- [ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
- [ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
- [ Comments? mailto:std-c++-request@ncar.ucar.edu ]
-